package com.zisuyi.uilibrary.module.activty.game.holder


import android.view.View
import com.weilele.mvvm.utils.vLaout.MvvmHolder
import com.weilele.mvvm.utils.vLaout.mvvmRcvAdapter
import com.zisuyi.uilibrary.R
import com.zisuyi.uilibrary.databinding.HolderGameTimesBinding

class GameTimesHolder : MvvmHolder<Boolean/*是否为亮色*/, HolderGameTimesBinding> {
    companion object {
        fun newInstance() = mvvmRcvAdapter(GameTimesHolder::class.java)
    }

    constructor(binding: HolderGameTimesBinding) : super(binding)
    constructor(itemView: View) : super(itemView)

    override fun bindData(data: Boolean) {
        if (data) {
            mBinding.root.setImageResource(R.drawable.life)
        } else {
            mBinding.root.setImageResource(R.drawable.life_lost)
        }
    }
}